package com.heifei

/**
 * @author caizhengjun01@gmail.com
 * @date 2020/8/4 3:27 下午
 */
object MapDemo {

  def main(args: Array[String]): Unit = {

    val user = Map("id" -> 1, "name" -> "caizhengjun", "age" -> 25)
    val name = user("name")

    val value = user.getOrElse("age", 18)

    //user("age") = 19

    println(value)
    //    println(name)
  }
}
